package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.redepronik.negosys.rrhh.entity.Empleadocargo;

/**
 * The persistent class for the bodegaempleadocargo database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "bodegaempleadocargo")
@NamedQuery(name = "Bodegaempleadocargo.findAll", query = "SELECT b FROM Bodegaempleadocargo b")
public class Bodegaempleadocargo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "BODEGAEMPLEADOCARGO_BODEGAEMPLEADOCARGOID_GENERATOR", sequenceName = "INVFAC.BODEGAEMPLEADOCARGO_BODEGAEMPLEADOCARGOID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BODEGAEMPLEADOCARGO_BODEGAEMPLEADOCARGOID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer bodegaempleadocargoid;

	// bi-directional many-to-one association to empleadoCargo
	@ManyToOne
	@JoinColumn(name = "empleadocargoid", nullable = false)
	private Empleadocargo empleadocargo;

	// bi-directional many-to-one association to Bodega
	@ManyToOne
	@JoinColumn(name = "bodegaid", nullable = false)
	private Bodega bodega;

	@Column(nullable = false)
	private Boolean activo;

	public Bodegaempleadocargo() {
	}

	public Boolean getActivo() {
		return activo;
	}

	public Bodega getBodega() {
		return this.bodega;
	}

	public Integer getBodegaempleadocargoid() {
		return bodegaempleadocargoid;
	}

	public Empleadocargo getEmpleadocargo() {
		return empleadocargo;
	}

	public void setActivo(Boolean activo) {
		this.activo = activo;
	}

	public void setBodega(Bodega bodega) {
		this.bodega = bodega;
	}

	public void setBodegaempleadocargoid(Integer bodegaempleadocargoid) {
		this.bodegaempleadocargoid = bodegaempleadocargoid;
	}

	public void setEmpleadocargo(Empleadocargo empleadocargo) {
		this.empleadocargo = empleadocargo;
	}

}